using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class GetInviteFriendResponse : GeneratedMessageLite<GetInviteFriendResponse, GetInviteFriendResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<GetInviteFriendResponse, GetInviteFriendResponse.Builder>
		{
			private bool resultIsReadOnly;
			private GetInviteFriendResponse result;
			protected override GetInviteFriendResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override GetInviteFriendResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override GetInviteFriendResponse DefaultInstanceForType
			{
				get
				{
					return GetInviteFriendResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public uint FriendCount
			{
				get
				{
					return this.result.FriendCount;
				}
				set
				{
					this.SetFriendCount(value);
				}
			}
			public IPopsicleList<InviteFriend> FriendListList
			{
				get
				{
					return this.PrepareBuilder().friendList_;
				}
			}
			public int FriendListCount
			{
				get
				{
					return this.result.FriendListCount;
				}
			}
			public Builder()
			{
				this.result = GetInviteFriendResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(GetInviteFriendResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private GetInviteFriendResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					GetInviteFriendResponse other = this.result;
					this.result = new GetInviteFriendResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override GetInviteFriendResponse.Builder Clear()
			{
				this.result = GetInviteFriendResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override GetInviteFriendResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new GetInviteFriendResponse.Builder(this.result);
				}
				return new GetInviteFriendResponse.Builder().MergeFrom(this.result);
			}
			public override GetInviteFriendResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override GetInviteFriendResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is GetInviteFriendResponse)
				{
					return this.MergeFrom((GetInviteFriendResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override GetInviteFriendResponse.Builder MergeFrom(GetInviteFriendResponse other)
			{
				return this;
			}
			public override GetInviteFriendResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override GetInviteFriendResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(GetInviteFriendResponse._getInviteFriendResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = GetInviteFriendResponse._getInviteFriendResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasFriendCount = input.ReadUInt32(ref this.result.friendCount_);
							continue;
						}
						if (num3 == 26u)
						{
							input.ReadMessageArray<InviteFriend>(num, text, this.result.friendList_, InviteFriend.DefaultInstance, extensionRegistry);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public GetInviteFriendResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public GetInviteFriendResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public GetInviteFriendResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public GetInviteFriendResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public GetInviteFriendResponse.Builder SetFriendCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasFriendCount = true;
				this.result.friendCount_ = value;
				return this;
			}
			public GetInviteFriendResponse.Builder ClearFriendCount()
			{
				this.PrepareBuilder();
				this.result.hasFriendCount = false;
				this.result.friendCount_ = 0u;
				return this;
			}
			public InviteFriend GetFriendList(int index)
			{
				return this.result.GetFriendList(index);
			}
			public GetInviteFriendResponse.Builder SetFriendList(int index, InviteFriend value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.friendList_[index] = value;
				return this;
			}
			public GetInviteFriendResponse.Builder SetFriendList(int index, InviteFriend.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.friendList_[index] = builderForValue.Build();
				return this;
			}
			public GetInviteFriendResponse.Builder AddFriendList(InviteFriend value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.friendList_.Add(value);
				return this;
			}
			public GetInviteFriendResponse.Builder AddFriendList(InviteFriend.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.friendList_.Add(builderForValue.Build());
				return this;
			}
			public GetInviteFriendResponse.Builder AddRangeFriendList(IEnumerable<InviteFriend> values)
			{
				this.PrepareBuilder();
				this.result.friendList_.Add(values);
				return this;
			}
			public GetInviteFriendResponse.Builder ClearFriendList()
			{
				this.PrepareBuilder();
				this.result.friendList_.Clear();
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int FriendCountFieldNumber = 2;
		public const int FriendListFieldNumber = 3;
		private static readonly GetInviteFriendResponse defaultInstance;
		private static readonly string[] _getInviteFriendResponseFieldNames;
		private static readonly uint[] _getInviteFriendResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasFriendCount;
		private uint friendCount_;
		private PopsicleList<InviteFriend> friendList_ = new PopsicleList<InviteFriend>();
		private int memoizedSerializedSize = -1;
		public static GetInviteFriendResponse DefaultInstance
		{
			get
			{
				return GetInviteFriendResponse.defaultInstance;
			}
		}
		public override GetInviteFriendResponse DefaultInstanceForType
		{
			get
			{
				return GetInviteFriendResponse.DefaultInstance;
			}
		}
		protected override GetInviteFriendResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public uint FriendCount
		{
			get
			{
				return this.friendCount_;
			}
		}
		public IList<InviteFriend> FriendListList
		{
			get
			{
				return this.friendList_;
			}
		}
		public int FriendListCount
		{
			get
			{
				return this.friendList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBaseResponse)
				{
					return false;
				}
				if (!this.hasFriendCount)
				{
					return false;
				}
				if (!this.BaseResponse.IsInitialized)
				{
					return false;
				}
				bool result;
				using (IEnumerator<InviteFriend> enumerator = this.FriendListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						InviteFriend current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							result = false;
							return result;
						}
					}
					return true;
				}
				return result;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasFriendCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.FriendCount);
				}
				using (IEnumerator<InviteFriend> enumerator = this.FriendListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						InviteFriend current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private GetInviteFriendResponse()
		{
		}
		public InviteFriend GetFriendList(int index)
		{
			return this.friendList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] getInviteFriendResponseFieldNames = GetInviteFriendResponse._getInviteFriendResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, getInviteFriendResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasFriendCount)
			{
				output.WriteUInt32(2, getInviteFriendResponseFieldNames[1], this.FriendCount);
			}
			if (this.friendList_.Count > 0)
			{
				output.WriteMessageArray<InviteFriend>(3, getInviteFriendResponseFieldNames[2], this.friendList_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasFriendCount)
			{
				num ^= this.friendCount_.GetHashCode();
			}
			using (IEnumerator<InviteFriend> enumerator = this.friendList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					InviteFriend current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			GetInviteFriendResponse getInviteFriendResponse = object_0 as GetInviteFriendResponse;
			if (getInviteFriendResponse == null)
			{
				return false;
			}
			if (this.hasBaseResponse != getInviteFriendResponse.hasBaseResponse || (this.hasBaseResponse && !this.baseResponse_.Equals(getInviteFriendResponse.baseResponse_)))
			{
				return false;
			}
			if (this.hasFriendCount != getInviteFriendResponse.hasFriendCount || (this.hasFriendCount && !this.friendCount_.Equals(getInviteFriendResponse.friendCount_)))
			{
				return false;
			}
			if (this.friendList_.Count != getInviteFriendResponse.friendList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.friendList_.Count; i++)
			{
				if (!this.friendList_[i].Equals(getInviteFriendResponse.friendList_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<GetInviteFriendResponse, GetInviteFriendResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<GetInviteFriendResponse, GetInviteFriendResponse.Builder>.PrintField("FriendCount", this.hasFriendCount, this.friendCount_, writer);
			GeneratedMessageLite<GetInviteFriendResponse, GetInviteFriendResponse.Builder>.PrintField<InviteFriend>("FriendList", this.friendList_, writer);
		}
		public static GetInviteFriendResponse ParseFrom(byte[] data)
		{
			return GetInviteFriendResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private GetInviteFriendResponse MakeReadOnly()
		{
			this.friendList_.MakeReadOnly();
			return this;
		}
		public static GetInviteFriendResponse.Builder CreateBuilder()
		{
			return new GetInviteFriendResponse.Builder();
		}
		public override GetInviteFriendResponse.Builder ToBuilder()
		{
			return GetInviteFriendResponse.CreateBuilder(this);
		}
		public override GetInviteFriendResponse.Builder CreateBuilderForType()
		{
			return new GetInviteFriendResponse.Builder();
		}
		public static GetInviteFriendResponse.Builder CreateBuilder(GetInviteFriendResponse prototype)
		{
			return new GetInviteFriendResponse.Builder(prototype);
		}
		static GetInviteFriendResponse()
		{
			GetInviteFriendResponse.defaultInstance = new GetInviteFriendResponse().MakeReadOnly();
			GetInviteFriendResponse._getInviteFriendResponseFieldNames = new string[]
			{
				"BaseResponse",
				"FriendCount",
				"FriendList"
			};
			GetInviteFriendResponse._getInviteFriendResponseFieldTags = new uint[]
			{
				10u,
				16u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.GetInviteFriendResponse.Descriptor, null);
		}
	}
}
